<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
		
		<div id="box">我是第二个</div>
		<div id="box">我是第一个</div>
 </body>
</html>
<script>
	//同名ID元素,只获取到第一个
	var oBox = document.getElementById('box');
	console.log(oBox);
</script>
